<?php
/**
 * @purpose: 对“通知”类型中子类型为15(踢出棒棒堂白名单时的通知)的编码与解码文件
 * @author: Mandel Woo <wuzhijian@snda.com>

 * @memo: 参阅母板文件
 */
require_once(dirname(__FILE__)."/../../../models/user/UCModUserInfo.php");


function msg_notice_type15_encoder() {
	return " ";
}

function msg_notice_type15_decoder() {
	$fields = array("id","receiverid","content","createTime","changeFlag","fmt");

	foreach($fields as $k => $v) {
		eval("\${$v}=func_get_arg($k);");
	}


	$users_infos = UCModUserInfo::getUserInfos(array($receiverid), array(USERINFO_NICKNAME));

	$receiver_nick = htmlspecialchars($users_infos[$receiverid][USERINFO_NICKNAME]);
	$receiver_nick == '' && $receiver_nick = $receiverid;


	if ($fmt == 'line') {
		return "棒棒堂温馨提醒";

	} else if ($fmt == 'box') {

		$html = "棒棒堂温馨提醒：<br />亲爱的{$receiver_nick}，您好~<br />很遗憾的通知您，您因长期没有更新推他，已将您从棒棒堂里移除:(<br />ps:棒棒堂建议您赶快更新推他，重新点亮勋章！棒棒堂期待您的归来！<br />别让您的粉丝们失望哦！";

		return '<div class="font14">' . $html . '</div>';

	} else {
		return '';
	}
}

